package com.language.points.multi.thread.zhishu;

/**
 * 查找多少以内的质数-普通方法
 * @author yll
 * @version 1.0.0
 * @date 2024/04/14 14：25
 * @desc 普通方法
 * */
public class FindZhiShu extends BaseFindZhiShu {
    public void find(Integer startNum, Integer endNum) {
        long startTime = System.nanoTime();
        findZhiShu(startNum, endNum);
        long endTime = System.nanoTime();
        long executionTime = endTime - startTime;
        System.out.println("执行时间: " + executionTime / 1000  + " 微秒");
    }

    public static void main(String[] args) {
//        FindZhiShu findZhiShu = new FindZhiShu();
//        Scanner scanner = new Scanner(System.in);
//        Integer startNum, endNum;
//        do {
//            System.out.print("请输入查找范围的起始值（大于1）:");
//            startNum = scanner.nextInt();
//            System.out.print("请输入查找范围的结束值（大于1）:");
//            endNum = scanner.nextInt();
//            findZhiShu.find(startNum, endNum);
//            findZhiShu.showZhiShu();
//            System.out.print("是否继续？（继续/1；结束/0）:");
//            System.out.println("");
//            startNum = scanner.nextInt();
//        }while (startNum == 1);
        BaseFindZhiShu findZhiShuTemp = new FindZhiShu();
    }

}
